Symmetrical Cellular Automata Control Panel Help

0. Contents

1. Introduction       top

This control panel provides an environment for comparing the different state symmetrical rules. It constructs a number of different initial patterns in a torus universe with tools probing different properties. The control panel is not limited to state symmetrical rules but by using the abbreviated notation either just the B part of the usual B/S notation or using the H form a state symmetrical rule is guaranteed.

The most studied state symmetrical CA is Day & Night which is defined as: B3678/S34678. The state symmetry is seen in that the list for survive is the opposite of the list for not survive (not Survive count = 8 - survive count) thus a state symmetrical CA can be defined just by the rules for being born. Following the practice of Wolfram the counts on which cells are born can be treated as bits in a binary number bit 0 set 1 for born on count zero thus B3678 is the binary number 1 1100 1000, however hexadecimal notation combines brevity with ease recovery of the bit positions giving H1C8 for this rule. The two's complement of 1 1100 1000 is 0 0011 0111 or in hexadecimal H037 which is referred to as the complementary rule to H1C8 both of these show the same pattern from the same initial conditions except that one changes state when the other does not. The control panel has the ability to swap between a rule and it's complement allowing reverse strobing to be investigated. With an empty universe the odd numbered rule strobes, changing state every generation some rules fill the universe with patterns that strobe in the odd rule a property referred to as reverse strobing. Golly does not support this rule simply running the even rule instead. The control panel has defined a set of three state rules which implement the odd numbered rules. This has two consequences firstly Golly has to be told where the rules are and secondly golly's population count is no longer meaningful.

A universe can be initialised with a random pattern, diagonal band, orthogonal band, checkerboard or an random filled island. A seed defined as a list of numbers 0-3 or as run length encoding of 'o', 'a', 'b' and 'c' ("00123" == "o2abc") is used to provide repeatable variations. The seed initialises the random sequence used for random patterns and imposes a pattern along one boundary of the bands and checkerboard patterns.

Features:

File Menu       top

Load Script from File For loading a script from a file
Paste Script For loading a script from the paste buffer
Run Script For running a loaded script
Set Rule Folder Change the folder containing the definition of the odd rules
Exit To exit the control panel

Edit Menu       top

Undo Undo previus command
Redo Redo previously undone command
Clear Clear the universe
Copy Pattern Copy the universe pattern in rle format to the paste buffer
Paste Pattern Paste a pattern in rle format from the paste buffer
Rotate Right Rotate the universe right pattern by the Rotate Step
Rotate Left Rotate the universe left pattern by the Rotate Step
Rotate Up Rotate the universe up pattern by the Rotate Step
Rotate Down Rotate the universe down pattern by the Rotate Step
Rotate Step Number of cells to rotate byk

Universe Menu       top

Commands that change the universe.

Step Run one Generation
Run Run until Stopped
Run to Generation Run to this Generation
Run n Generations Run a number of Generations
Swap:Comp Swap this Rule for the Complementry Rule
Rebuild Rebuild generation 0
Change Rule New Rule
Change Width New Width
Change Hight New Hight
Change Seed New Seed
Change Geometry New Geometry
Change Island Size Specify Island size for Island Geometries

Lists Menu       top

There are two list that can be entired. One for Rules and one for Seeds. This enables a number of rules to be compared with each other with a range of seeds.

Rule List Build item Build the universe with the next Rule on the Rule List
Change Rule List Enter a new list of Rules
Change next Rule item Change the position in the list of rule the next rule will come from
Seed List Build item Build the universe with the next Seed on the Seed List
Change Seed List Enter a new list of Seeds
Change next Seed item Change the position in the list of Seed the next Seed will come from

View Menu       top

Fit Fit the Universe to the screen
Change Rule Format Rules can be displayed in either B/S format or the abriviated Hexadecimal format
Rule Description Show the description of the rule in a separate dialogue
List Script List the loaded script

Layer Menu       top

Stack Layers Golly Stack Layers, useful with Tools menu Island Analysis
Tile Layers Golly Tile Layers
"Change Layer Golly select layer
Delete Extra Layers Delete layers added by tools or Scripts

Tools Menu       top

Find End Runs until the Type of Find End determines that a conclusion has been reached
Change Find End Type How the end of the run is determined:
OSC Oscillation found
Break A Band has broken when boundaries meet
Change Find End Initial Step The size of the initial step starting the search for the End result
Change Find End Max Generation The generation to abandon the search.
The algorithm does no stick on this limit exactly but it does represent a limit
Change Find End Min Period The Find End procedure may be speeded up by increasing this a little bit when large numbers are expected
Change Find End Max Period The maximum period that can be detected by the Find End procedure. Smaller numbers are faster.
Island Analysis Identifies orthogonally connected islands. The larges Islands of each state are shown in separate layers and colours
Island Analysis Results Repeats the results of the last Island Analysis

Help Menu       top

Lists the actions of the menu items and gives some backgound information.

KeyBoard ShortCuts       top

KeyboardShortcuts
rrun
sstep
bback
fforward

Scripting       top

Scripts are extensions intended for long searches through rules to collect information for statistical analysis. The script file has a standard format to pass information to external lua modules. These modules can use functions in the control panel modules to utilize Gollys features. A very simple example is Stain-Script.txt:


    SymCA scripting
    SCRIPT script2-Stain
    GENS = 84
    ONECHANGE = TRUE
    SCRIPTEND



SymCA scripting identifies the begining, SCRIPT script2-Stain identifies the external module as script2-Stain.lua, GENS = gives the number of generation to pass to the module, ONECHANGE is a logical value to pass to the module and SCRIPTEND inidcate the last instruction. This module adds a layer and colours cells which have changed state over the number of generations given. When ONECHANGE is true any cells in the initial layer that have changed state are deleted so that stacked layers give one colour for any cell that has changed state.

The module must define interface tables:

    m.colonList = {}
    m.equalList = {['GENS'] = {'d',""}, ['ONECHANGE'] = {'l',"R"}}

Where m is the table returned by the module. colonList defines the lists , not required in this exsmple but normaly a list of rules or a list of seeds is required looking like:RULE: B3678, H1C9 in the script file. The 'l' and 'd' indicate logical and decimal the other option is 't' for text. The "R" indicates that the command is required.

The module script2.lua contains the code for scripting and requires that extension modules define the following interface functions:

    m.init(logfile, commonprocs)
    m.buildParmLst(cmd, parms, segNo)
    m.buildParmVal(cmd, value, segNo)
    m.validateScript()
    m.run(segmentNo)

init passes the module a logfile and a table with some common procedures, buildParmLst passes the module lists of values for colonList commands from the script file, buildParmVal passes the module values of equalList commands from the script, validateScript gives the module a chance to return a false value if the data in the script file is invalid and the run function is called to do the work.